//通过提现
function showAgree(cashoutId) {
    if (confirm("请确认是否已将提现金额转至提现账户？")) {
        $.ajax({
            type: 'GET',
            url: 'cashout/agree',
            dataType: 'json',
            data: {
                "cashoutId": cashoutId
            },
            error: function (request) {
                alert("未知错误，处理提现申请失败");
            },
            success: function (res) {
                if (res.code == 0) {
                    alert("处理提现申请成功");
                    window.location.reload();
                } else {
                    alert(res.msg);
                }
            }
        });
    }
}

//拒绝提现
function showReject(cashoutId) {
    if (confirm("是否确认拒绝退款？")) {
        $.ajax({
            type: 'GET',
            url: 'cashout/reject',
            dataType: 'json',
            data: {
                "cashoutId": cashoutId
            },
            error: function (request) {
                alert("未知错误，拒绝提现申请失败");
            },
            success: function (res) {
                if (res.code == 0) {
                    alert("拒绝提现申请成功");
                    window.location.reload();
                } else {
                    alert(res.msg);
                }
            }
        });
    }
}
